﻿using Model.BusinessModel.OutPut;
using Model.DomainModel;

namespace Infrastructure.IRepository
{
    /// <summary>
    ///流程申请仓储接口
    /// </summary>
    public interface IFlowApplyRepository : IRepository<FlowApply>
    {
        /// <summary>
        /// 根据申请名称获取申请数据
        /// </summary>
        /// <param name="applyTitle">申请名称</param>
        /// <returns></returns>
        FlowApply? GetFlowApplyByApplyTitle(string applyTitle);

        /// <summary>
        /// 根据申请id获取数据
        /// </summary>
        /// <param name="flowApplyId">申请id</param>
        /// <returns></returns>
        FlowApplyExtendOutPut? GetFlowApplyByApplyId(string flowApplyId);

        /// <summary>
        /// 更新流程状态
        /// </summary>
        /// <param name="flowApplyId">流程id</param>
        /// <param name="flowApplyState">流程状态</param>
        /// <returns></returns>
        bool UpdateFlowApplyState(string flowApplyId, int flowApplyState);

        /// <summary>
        /// 根据流程id,获取申请流程
        /// </summary>
        /// <param name="flowId">流程id</param>
        /// <returns></returns>
        List<FlowApply> GetFlowApplyByFlowId(string flowId);
    }
}
